<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./JS/vue.js"></script>
</head>
<body>
    <div id="app">
        <cpn2></cpn2>
    </div>
    <script>
        //第一个组件 子组件
        const cpnC1 = Vue.extend({
            template:`
            <div>
                <h1>我是标题1</h1>
                </div>
            `
        })
// 第二个组件 父组件
        const cpnC2 = Vue.extend({
            template:`
            <div>
                <h1>我是标题2</h1>
                <cpn1></cpn1>
            </div>
            `,
            components: {
                cpn1:cpnC1
            }
        })
        //root 根组件
        const app = new Vue({
            el: '#app',
            data:{

            },
            methods:{
            },
            components: {
                cpn2:cpnC2
            }
        })
    </script>
</body>
</html>